<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::HTTPNode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32 HTTPS Server
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1HTTPNode.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classhttpsserver_1_1HTTPNode-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">httpsserver::HTTPNode Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for a URL/route-handler in the server.  
 <a href="classhttpsserver_1_1HTTPNode.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="HTTPNode_8hpp_source.html">HTTPNode.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for httpsserver::HTTPNode:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPNode__inherit__graph.png" border="0" usemap="#httpsserver_1_1HTTPNode_inherit__map" alt="Inheritance graph"/></div>
<map name="httpsserver_1_1HTTPNode_inherit__map" id="httpsserver_1_1HTTPNode_inherit__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1ResourceNode.html" title="This HTTPNode represents a route that maps to a regular HTTP request for a resource (static or dynami..." alt="" coords="5,80,188,107"/>
<area shape="rect" id="node3" href="classhttpsserver_1_1WebsocketNode.html" title="httpsserver::WebsocketNode" alt="" coords="213,80,405,107"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9ac2e1f2251bcc42c78c205bfffca287"><td class="memItemLeft" align="right" valign="top"><a id="a9ac2e1f2251bcc42c78c205bfffca287"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>HTTPNode</b> (const std::string &amp;path, const <a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ff">HTTPNodeType</a> nodeType, const std::string &amp;tag=&quot;&quot;)</td></tr>
<tr class="separator:a9ac2e1f2251bcc42c78c205bfffca287"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4522daa31f0131e13905dc78e4b52624"><td class="memItemLeft" align="right" valign="top"><a id="a4522daa31f0131e13905dc78e4b52624"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>hasPathParameter</b> ()</td></tr>
<tr class="separator:a4522daa31f0131e13905dc78e4b52624"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a7beb26428befe39673d41ead8409b8"><td class="memItemLeft" align="right" valign="top"><a id="a1a7beb26428befe39673d41ead8409b8"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>getPathParamCount</b> ()</td></tr>
<tr class="separator:a1a7beb26428befe39673d41ead8409b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4e5367fe2bd1c5e618c18ce1ef3c7c5"><td class="memItemLeft" align="right" valign="top"><a id="ad4e5367fe2bd1c5e618c18ce1ef3c7c5"></a>
ssize_t&#160;</td><td class="memItemRight" valign="bottom"><b>getParamIdx</b> (size_t)</td></tr>
<tr class="separator:ad4e5367fe2bd1c5e618c18ce1ef3c7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37684fe9ce29dedba1d7ce68f2a856df"><td class="memItemLeft" align="right" valign="top"><a id="a37684fe9ce29dedba1d7ce68f2a856df"></a>
std::vector&lt; <a class="el" href="classhttpsserver_1_1HTTPValidator.html">HTTPValidator</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>getValidators</b> ()</td></tr>
<tr class="separator:a37684fe9ce29dedba1d7ce68f2a856df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa3b4c1f962e0a5b4d8466c9d8f7d24b"><td class="memItemLeft" align="right" valign="top"><a id="aaa3b4c1f962e0a5b4d8466c9d8f7d24b"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getMethod</b> ()=0</td></tr>
<tr class="separator:aaa3b4c1f962e0a5b4d8466c9d8f7d24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51fd863bd8b32b429e8fce19661d3dea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPNode.html#a51fd863bd8b32b429e8fce19661d3dea">addPathParamValidator</a> (size_t paramIdx, const HTTPValidationFunction *validator)</td></tr>
<tr class="separator:a51fd863bd8b32b429e8fce19661d3dea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:af4fbb118d43d71e5cdfd1cbca1f670c6"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPNode.html#af4fbb118d43d71e5cdfd1cbca1f670c6">_path</a></td></tr>
<tr class="separator:af4fbb118d43d71e5cdfd1cbca1f670c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bf9e9fc05c92c16840cdc4ee4793843"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPNode.html#a6bf9e9fc05c92c16840cdc4ee4793843">_tag</a></td></tr>
<tr class="separator:a6bf9e9fc05c92c16840cdc4ee4793843"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a92d246df5a978b635329ddf08f602b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ff">HTTPNodeType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPNode.html#a6a92d246df5a978b635329ddf08f602b">_nodeType</a></td></tr>
<tr class="separator:a6a92d246df5a978b635329ddf08f602b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for a URL/route-handler in the server. </p>
<p>Use <a class="el" href="classhttpsserver_1_1ResourceNode.html" title="This HTTPNode represents a route that maps to a regular HTTP request for a resource (static or dynami...">ResourceNode</a> for requests that access dynamic or static resources or HttpNode for routes that create Websockets. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a51fd863bd8b32b429e8fce19661d3dea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51fd863bd8b32b429e8fce19661d3dea">&#9670;&nbsp;</a></span>addPathParamValidator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpsserver::HTTPNode::addPathParamValidator </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>paramIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const HTTPValidationFunction *&#160;</td>
          <td class="paramname"><em>validator</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a validation function that checks if the actual value of a parameter matches the expectation </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">paramIdx</td><td>defines the ID of the parameter that should be checked (starts by 0) </td></tr>
    <tr><td class="paramname">validator</td><td>the function (string -&gt; bool) that checks if the parameter matches the expecatation</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="ValidatorFunctions_8hpp_source.html">ValidatorFunctions.hpp</a> if you need some predefined templates for functions </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a6a92d246df5a978b635329ddf08f602b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a92d246df5a978b635329ddf08f602b">&#9670;&nbsp;</a></span>_nodeType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespacehttpsserver.html#a2dcb10ebf7a4b0511b3ca52d4af865ff">HTTPNodeType</a> httpsserver::HTTPNode::_nodeType</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Stores the type of the node (as we have not runtime type information by default) </p>

</div>
</div>
<a id="af4fbb118d43d71e5cdfd1cbca1f670c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4fbb118d43d71e5cdfd1cbca1f670c6">&#9670;&nbsp;</a></span>_path</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string httpsserver::HTTPNode::_path</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The path under which this node will be available. Should start with a slash. Example: "/myResource" </p>

</div>
</div>
<a id="a6bf9e9fc05c92c16840cdc4ee4793843"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bf9e9fc05c92c16840cdc4ee4793843">&#9670;&nbsp;</a></span>_tag</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string httpsserver::HTTPNode::_tag</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Stores a tag that can be used in middleware and handler functions to identify this specific node, tag the node with a required permission, ... </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="HTTPNode_8hpp_source.html">HTTPNode.hpp</a></li>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPNode.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1HTTPNode.html">HTTPNode</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
